package dao

import (
	"context"
	"mall-portalv2/internal/model"
)

/**
* Author: joker
* TODO: test
* Date: 2022/8/19
* Time: 上午10:04
**/

func (d *Dao) InsertLogs(ctx context.Context, model model.Logs) (model.Logs, error) {
	if err := d.db.WithContext(ctx).Table(model.TableName()).Create(&model).Error; err != nil {
		return model, err
	}
	return model, nil
}
